<?php

declare (strict_types=1);
/**
 * @copyright 深圳市易果网络科技有限公司
 * @version 1.0.0
 * @link https://dayiguo.com
 */

namespace App\Request\User\ScanOrder;

use App\Request\RequestAbstract;

/**
 * 订单支付验证器
 *
 * @author 刘兴永(aile8880@qq.com)
 * @package App\Request\User\Order
 */
class PayRequest extends RequestAbstract
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'amount' => ['required'],
            'business_id' => ['required'],
            'channel' => ['required', 'in:wx,alipay,wx_wap,wx_pub']
        ];
    }
}